/* @flow */
'use strict';

var React = require('react-native');

var {
	StyleSheet,
	View,
	Image,
	TouchableHighlight,
	AlertIOS
} = React;

var TouchableHighlightView = React.createClass({

	showAlert: function() {
		AlertIOS.alert(
			'提示',
			'点击了按钮', [{
				text: 'OK',
				onPress: () => console.log()
			}, {
				text: 'NO',
				onPress: () => console.log('Bar Pressed!')
			}, ]
		)
	},

	render: function() {
		return (
			<TouchableHighlight
			  onPress={this.showAlert}
			  style={styles.touchStyle}
			  underlayColor='#8FE4FB'>
			  	<Image
			  	  style={styles.imageStyle}
			  	  source={{uri: 'https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/logo_white_fe6da1ec.png'}} />
			  	
			</TouchableHighlight>
		);
	}
});


var styles = StyleSheet.create({
	touchStyle: {
		marginTop: 64,
		height: 100
	},
	imageStyle: {
		alignItems: 'center',
		height: 100,
		width: 300
	}
});


module.exports = TouchableHighlightView;